package com.quan.mall.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;


import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import javax.validation.constraints.NotNull;
import com.quan.commons.core.bean.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 财务-会员资金流水
 *
 * @author yhaoquan
 * @email yhaoquan@163.com
 * @date 2021-04-22 14:22:06
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("fms_report_commision")
public class FmsReportCommision extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
    @TableId
    private Long id;

	/**
	 * OPENID
	 */
    private String openId;

	/**
	 * 会员ID
	 */
    private Long memberId;

	/**
	 * 会员名称
	 */
    private String memberName;

	/**
	 * 会员分成金额
	 */
    private BigDecimal memberCommission;

	/**
	 * 会员标记：0->非业务代理，1->内部员工，2->外部分销
	 */
	private Integer memberFlag;

	/**
	 * 代理商ID
	 */
    private Long agentId;

	/**
	 * 代理商名称
	 */
    private String agentName;

	/**
	 * 代理商分成金额
	 */
    private BigDecimal agentCommission;

	/**
	 * 订单日期
	 */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime orderTime;

	/**
	 * 订单编号
	 */
    private String orderSn;

	/**
	 * 订单实际付款金额
	 */
    private BigDecimal orderAmount;

	/**
	 * 总部分成金额
	 */
    private BigDecimal companyCommission;

	/**
	 * 备注
	 */
    private String remarks;

	/**
	 * 创建时间
	 */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime ctime;


}
